AOMedia AV1 Codec
tpl_model.h
1/*
2 * Copyright (c) 2019, Alliance for Open Media. All rights reserved.
3 *
4 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10 */
11
12#ifndef AOM_AV1_ENCODER_TPL_MODEL_H_
13#define AOM_AV1_ENCODER_TPL_MODEL_H_
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
20
21struct AV1_PRIMARY;
22struct AV1_COMP;
23struct AV1_SEQ_CODING_TOOLS;
25struct EncodeFrameInput;
26struct GF_GROUP;
27struct ThreadData;
28struct TPL_INFO;
29
30#include "config/aom_config.h"
31
32#include "aom/aom_tpl.h"
33#include "aom_scale/yv12config.h"
34#include "aom_util/aom_pthread.h"
35
36#include "av1/common/mv.h"
37#include "av1/common/scale.h"
38#include "av1/encoder/av1_ext_ratectrl.h"
39#include "av1/encoder/block.h"
41#include "av1/encoder/ratectrl.h"
42
43static inline BLOCK_SIZE convert_length_to_bsize(int length) {
44 switch (length) {
45 case 64: return BLOCK_64X64;
46 case 32: return BLOCK_32X32;
47 case 16: return BLOCK_16X16;
48 case 8: return BLOCK_8X8;
49 case 4: return BLOCK_4X4;
50 default:
51 assert(0 && "Invalid block size for tpl model");
52 return BLOCK_16X16;
53 }
54}
55
56typedef struct AV1TplRowMultiThreadSync {
57#if CONFIG_MULTITHREAD
58 // Synchronization objects for top-right dependency.
59 pthread_mutex_t *mutex_;
60 pthread_cond_t *cond_;
61#endif
62 // Buffer to store the macroblock whose encoding is complete.
63 // num_finished_cols[i] stores the number of macroblocks which finished
64 // encoding in the ith macroblock row.
65 int *num_finished_cols;
66 // Number of extra macroblocks of the top row to be complete for encoding
67 // of the current macroblock to start. A value of 1 indicates top-right
68 // dependency.
69 int sync_range;
70 // Number of macroblock rows.
71 int rows;
72 // Number of threads processing the current tile.
73 int num_threads_working;
74} AV1TplRowMultiThreadSync;
75
76typedef struct AV1TplRowMultiThreadInfo {
77 // Initialized to false, set to true by the worker thread that encounters an
78 // error in order to abort the processing of other worker threads.
79 bool tpl_mt_exit;
80#if CONFIG_MULTITHREAD
81 // Mutex lock object used for error handling.
82 pthread_mutex_t *mutex_;
83#endif
84 // Row synchronization related function pointers.
85 void (*sync_read_ptr)(AV1TplRowMultiThreadSync *tpl_mt_sync, int r, int c);
86 void (*sync_write_ptr)(AV1TplRowMultiThreadSync *tpl_mt_sync, int r, int c,
87 int cols);
88} AV1TplRowMultiThreadInfo;
89
90// TODO(jingning): This needs to be cleaned up next.
91
92// TPL stats buffers are prepared for every frame in the GOP,
93// including (internal) overlays and (internal) arfs.
94// In addition, frames in the lookahead that are outside of the GOP
95// are also used.
96// Thus it should use
97// (gop_length) + (# overlays) + (MAX_LAG_BUFFERS - gop_len) =
98// MAX_LAG_BUFFERS + (# overlays)
99// 2 * MAX_LAG_BUFFERS is therefore a safe estimate.
100// TODO(bohanli): test setting it to 1.5 * MAX_LAG_BUFFER
101#define MAX_TPL_FRAME_IDX (2 * MAX_LAG_BUFFERS)
102// The first REF_FRAMES + 1 buffers are reserved.
103// tpl_data->tpl_frame starts after REF_FRAMES + 1
104#define MAX_LENGTH_TPL_FRAME_STATS (MAX_TPL_FRAME_IDX + REF_FRAMES + 1)
105#define TPL_DEP_COST_SCALE_LOG2 4
106
107#define TPL_EPSILON 0.0000001
108
109typedef struct TplTxfmStats {
110 int ready; // Whether abs_coeff_mean is ready
111 double abs_coeff_sum[256]; // Assume we are using 16x16 transform block
112 double abs_coeff_mean[256];
113 int txfm_block_count;
114 int coeff_num;
115} TplTxfmStats;
116
117typedef struct {
118 uint8_t *predictor8;
119 int16_t *src_diff;
120 tran_low_t *coeff;
121 tran_low_t *qcoeff;
122 tran_low_t *dqcoeff;
123} TplBuffers;
124
125typedef struct TplDepStats {
126 int64_t srcrf_sse;
127 int64_t srcrf_dist;
128 int64_t recrf_sse;
129 int64_t recrf_dist;
130 int64_t intra_sse;
131 int64_t intra_dist;
132 int64_t cmp_recrf_dist[2];
133 int64_t mc_dep_rate;
134 int64_t mc_dep_dist;
135 int64_t pred_error[INTER_REFS_PER_FRAME];
136 int32_t intra_cost;
137 int32_t inter_cost;
138 int32_t srcrf_rate;
139 int32_t recrf_rate;
140 int32_t intra_rate;
141 int32_t cmp_recrf_rate[2];
142 int_mv mv[INTER_REFS_PER_FRAME];
143 int8_t ref_frame_index[2];
144} TplDepStats;
145
146typedef struct TplDepFrame {
147 uint8_t is_valid;
148 TplDepStats *tpl_stats_ptr;
149 const YV12_BUFFER_CONFIG *gf_picture;
150 YV12_BUFFER_CONFIG *rec_picture;
151 int ref_map_index[REF_FRAMES];
152 int stride;
153 // width and height here is in the unit of 16x16 block.
154 int width;
155 int height;
156 int mi_rows;
157 int mi_cols;
158 int base_rdmult;
159 uint32_t frame_display_index;
160 // When set, SAD metric is used for intra and inter mode decision.
161 int use_pred_sad;
162} TplDepFrame;
163
168typedef struct TplParams {
172 int ready;
173
178
183
189 TplDepFrame tpl_stats_buffer[MAX_LENGTH_TPL_FRAME_STATS];
190
196 TplDepStats *tpl_stats_pool[MAX_LAG_BUFFERS];
197
204 TplTxfmStats *txfm_stats_list;
205
210 YV12_BUFFER_CONFIG tpl_rec_pool[MAX_LAG_BUFFERS];
211
215 TplDepFrame *tpl_frame;
216
220 struct scale_factors sf;
221
226
232 const YV12_BUFFER_CONFIG *src_ref_frame[INTER_REFS_PER_FRAME];
233
239 const YV12_BUFFER_CONFIG *ref_frame[INTER_REFS_PER_FRAME];
240
244 YV12_BUFFER_CONFIG prev_gop_arf_src;
245
249 YV12_BUFFER_CONFIG prev_gop_arf_tpl_recon;
250
255
260 AV1TplRowMultiThreadSync tpl_mt_sync;
261
266
271} TplParams;
272
273#if CONFIG_BITRATE_ACCURACY || CONFIG_RATECTRL_LOG
274#define VBR_RC_INFO_MAX_FRAMES 500
275#endif // CONFIG_BITRATE_ACCURACY || CONFIG_RATECTRL_LOG
276
277#if CONFIG_BITRATE_ACCURACY
278
283typedef struct {
284 int ready;
285 double total_bit_budget; // The total bit budget of the entire video
286 int show_frame_count; // Number of show frames in the entire video
287
288 int gop_showframe_count; // The number of show frames in the current gop
289 double gop_bit_budget; // The bitbudget for the current gop
290 double scale_factors[FRAME_UPDATE_TYPES]; // Scale factors to improve the
291 // budget estimation
292 double mv_scale_factors[FRAME_UPDATE_TYPES]; // Scale factors to improve
293 // MV entropy estimation
294
295 // === Below this line are GOP related data that will be updated per GOP ===
296 int base_q_index; // Stores the base q index.
297 int q_index_list_ready;
298 int q_index_list[VBR_RC_INFO_MAX_FRAMES]; // q indices for the current
299 // GOP
300
301 // Array to store qstep_ratio for each frame in a GOP
302 double qstep_ratio_list[VBR_RC_INFO_MAX_FRAMES];
303
304#if CONFIG_THREE_PASS
305 TplTxfmStats txfm_stats_list[VBR_RC_INFO_MAX_FRAMES];
306 FRAME_UPDATE_TYPE update_type_list[VBR_RC_INFO_MAX_FRAMES];
307 int gop_start_idx_list[VBR_RC_INFO_MAX_FRAMES];
308 int gop_length_list[VBR_RC_INFO_MAX_FRAMES];
309 int cur_gop_idx;
310 int total_frame_count;
311 int gop_count;
312#endif // CONFIG_THREE_PASS
313} VBR_RATECTRL_INFO;
314
315static inline void vbr_rc_reset_gop_data(VBR_RATECTRL_INFO *vbr_rc_info) {
316 vbr_rc_info->q_index_list_ready = 0;
317 av1_zero(vbr_rc_info->q_index_list);
318}
319
320void av1_vbr_rc_init(VBR_RATECTRL_INFO *vbr_rc_info, double total_bit_budget,
321 int show_frame_count);
322
323int av1_vbr_rc_frame_coding_idx(const VBR_RATECTRL_INFO *vbr_rc_info,
324 int gf_frame_index);
325
326void av1_vbr_rc_append_tpl_info(VBR_RATECTRL_INFO *vbr_rc_info,
327 const struct TPL_INFO *tpl_info);
328
329void av1_vbr_rc_set_gop_bit_budget(VBR_RATECTRL_INFO *vbr_rc_info,
330 int gop_showframe_count);
331
332void av1_vbr_rc_compute_q_indices(int base_q_index, int frame_count,
333 const double *qstep_ratio_list,
334 aom_bit_depth_t bit_depth, int *q_index_list);
335
344void av1_vbr_rc_update_q_index_list(VBR_RATECTRL_INFO *vbr_rc_info,
345 const TplParams *tpl_data,
346 const struct GF_GROUP *gf_group,
347 aom_bit_depth_t bit_depth);
348/*
349 *!\brief Compute the number of bits needed to encode a GOP
350 *
351 * \param[in] base_q_index base layer q_index
352 * \param[in] bit_depth bit depth
353 * \param[in] update_type_scale_factors array of scale factors for each
354 * update_type
355 * \param[in] frame_count size of update_type_list,
356 * qstep_ratio_list stats_list,
357 * q_index_list and
358 * estimated_bitrate_byframe
359 * \param[in] update_type_list array of update_type, one per frame
360 * \param[in] qstep_ratio_list array of qstep_ratio, one per frame
361 * \param[in] stats_list array of transform stats, one per
362 * frame
363 * \param[out] q_index_list array of q_index, one per frame
364 * \param[out] estimated_bitrate_byframe array to keep track of frame
365 * bitrate
366 *
367 * \return The estimated GOP bitrate.
368 *
369 */
370double av1_vbr_rc_info_estimate_gop_bitrate(
371 int base_q_index, aom_bit_depth_t bit_depth,
372 const double *update_type_scale_factors, int frame_count,
373 const FRAME_UPDATE_TYPE *update_type_list, const double *qstep_ratio_list,
374 const TplTxfmStats *stats_list, int *q_index_list,
375 double *estimated_bitrate_byframe);
376
398int av1_vbr_rc_info_estimate_base_q(
399 double bit_budget, aom_bit_depth_t bit_depth,
400 const double *update_type_scale_factors, int frame_count,
401 const FRAME_UPDATE_TYPE *update_type_list, const double *qstep_ratio_list,
402 const TplTxfmStats *stats_list, int *q_index_list,
403 double *estimated_bitrate_byframe);
404
405#endif // CONFIG_BITRATE_ACCURACY
406
407#if CONFIG_RD_COMMAND
408typedef enum {
409 RD_OPTION_NONE,
410 RD_OPTION_SET_Q,
411 RD_OPTION_SET_Q_RDMULT
412} RD_OPTION;
413
414typedef struct RD_COMMAND {
415 RD_OPTION option_ls[MAX_LENGTH_TPL_FRAME_STATS];
416 int q_index_ls[MAX_LENGTH_TPL_FRAME_STATS];
417 int rdmult_ls[MAX_LENGTH_TPL_FRAME_STATS];
418 int frame_count;
419 int frame_index;
420} RD_COMMAND;
421
422void av1_read_rd_command(const char *filepath, RD_COMMAND *rd_command);
423#endif // CONFIG_RD_COMMAND
424
425static inline bool av1_use_tpl_for_extrc(AOM_EXT_RATECTRL const *ext_rc) {
426 return ext_rc->ready && ext_rc->funcs.send_tpl_gop_stats != NULL;
427}
428
436
437void av1_setup_tpl_buffers(struct AV1_PRIMARY *const ppi,
438 CommonModeInfoParams *const mi_params, int width,
439 int height, int byte_alignment, int lag_in_frames);
440
441static inline void tpl_dealloc_temp_buffers(TplBuffers *tpl_tmp_buffers) {
442 aom_free(tpl_tmp_buffers->predictor8);
443 tpl_tmp_buffers->predictor8 = NULL;
444 aom_free(tpl_tmp_buffers->src_diff);
445 tpl_tmp_buffers->src_diff = NULL;
446 aom_free(tpl_tmp_buffers->coeff);
447 tpl_tmp_buffers->coeff = NULL;
448 aom_free(tpl_tmp_buffers->qcoeff);
449 tpl_tmp_buffers->qcoeff = NULL;
450 aom_free(tpl_tmp_buffers->dqcoeff);
451 tpl_tmp_buffers->dqcoeff = NULL;
452}
453
454static inline bool tpl_alloc_temp_buffers(TplBuffers *tpl_tmp_buffers,
455 uint8_t tpl_bsize_1d) {
456 // Number of pixels in a tpl block
457 const int tpl_block_pels = tpl_bsize_1d * tpl_bsize_1d;
458
459 // Allocate temporary buffers used in mode estimation.
460 tpl_tmp_buffers->predictor8 = (uint8_t *)aom_memalign(
461 32, tpl_block_pels * 2 * sizeof(*tpl_tmp_buffers->predictor8));
462 tpl_tmp_buffers->src_diff = (int16_t *)aom_memalign(
463 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->src_diff));
464 tpl_tmp_buffers->coeff = (tran_low_t *)aom_memalign(
465 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->coeff));
466 tpl_tmp_buffers->qcoeff = (tran_low_t *)aom_memalign(
467 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->qcoeff));
468 tpl_tmp_buffers->dqcoeff = (tran_low_t *)aom_memalign(
469 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->dqcoeff));
470
471 if (!(tpl_tmp_buffers->predictor8 && tpl_tmp_buffers->src_diff &&
472 tpl_tmp_buffers->coeff && tpl_tmp_buffers->qcoeff &&
473 tpl_tmp_buffers->dqcoeff)) {
474 tpl_dealloc_temp_buffers(tpl_tmp_buffers);
475 return false;
476 }
477 return true;
478}
479
491int av1_tpl_setup_stats(struct AV1_COMP *cpi, int gop_eval,
492 const struct EncodeFrameParams *const frame_params);
493
495
496void av1_tpl_preload_rc_estimate(
497 struct AV1_COMP *cpi, const struct EncodeFrameParams *const frame_params);
498
499int av1_tpl_ptr_pos(int mi_row, int mi_col, int stride, uint8_t right_shift);
500
501void av1_init_tpl_stats(TplParams *const tpl_data);
502
503int av1_tpl_stats_ready(const TplParams *tpl_data, int gf_frame_index);
504
505void av1_tpl_rdmult_setup(struct AV1_COMP *cpi);
506
507void av1_tpl_rdmult_setup_sb(struct AV1_COMP *cpi, MACROBLOCK *const x,
508 BLOCK_SIZE sb_size, int mi_row, int mi_col);
509
510void av1_mc_flow_dispenser_row(struct AV1_COMP *cpi,
511 TplTxfmStats *tpl_txfm_stats,
512 TplBuffers *tpl_tmp_buffers, MACROBLOCK *x,
513 int mi_row, BLOCK_SIZE bsize, TX_SIZE tx_size);
514
527double av1_exponential_entropy(double q_step, double b);
528
542double av1_laplace_entropy(double q_step, double b, double zero_bin_ratio);
543
544#if CONFIG_BITRATE_ACCURACY
562double av1_laplace_estimate_frame_rate(int q_index, int block_count,
563 const double *abs_coeff_mean,
564 int coeff_num);
565#endif // CONFIG_BITRATE_ACCURACY
566
567/*
568 *!\brief Init TplTxfmStats
569 *
570 * \param[in] tpl_txfm_stats a structure for storing transform stats
571 *
572 */
573void av1_init_tpl_txfm_stats(TplTxfmStats *tpl_txfm_stats);
574
575#if CONFIG_BITRATE_ACCURACY
576/*
577 *!\brief Accumulate TplTxfmStats
578 *
579 * \param[in] sub_stats a structure for storing sub transform stats
580 * \param[out] accumulated_stats a structure for storing accumulated
581 *transform stats
582 *
583 */
584void av1_accumulate_tpl_txfm_stats(const TplTxfmStats *sub_stats,
585 TplTxfmStats *accumulated_stats);
586
587/*
588 *!\brief Record a transform block into TplTxfmStats
589 *
590 * \param[in] tpl_txfm_stats A structure for storing transform stats
591 * \param[out] coeff An array of transform coefficients. Its size
592 * should equal to tpl_txfm_stats.coeff_num.
593 *
594 */
595void av1_record_tpl_txfm_block(TplTxfmStats *tpl_txfm_stats,
596 const tran_low_t *coeff);
597
598/*
599 *!\brief Update abs_coeff_mean and ready of txfm_stats
600 * If txfm_block_count > 0, this function will use abs_coeff_sum and
601 * txfm_block_count to compute abs_coeff_mean. Moreover, reday flag
602 * will be set to one.
603 *
604 * \param[in] txfm_stats A structure for storing transform stats
605 */
606void av1_tpl_txfm_stats_update_abs_coeff_mean(TplTxfmStats *txfm_stats);
607#endif // CONFIG_BITRATE_ACCURACY
608
624double av1_estimate_coeff_entropy(double q_step, double b,
625 double zero_bin_ratio, int qcoeff);
626
627// TODO(angiebird): Add doxygen description here.
628int64_t av1_delta_rate_cost(int64_t delta_rate, int64_t recrf_dist,
629 int64_t srcrf_dist, int pix_num);
630
646int av1_get_overlap_area(int row_a, int col_a, int row_b, int col_b, int width,
647 int height);
648
658int av1_tpl_get_q_index(const TplParams *tpl_data, int gf_frame_index,
659 int leaf_qindex, aom_bit_depth_t bit_depth);
660
671double av1_tpl_get_qstep_ratio(const TplParams *tpl_data, int gf_frame_index);
672
681int av1_get_q_index_from_qstep_ratio(int leaf_qindex, double qstep_ratio,
682 aom_bit_depth_t bit_depth);
683
698int_mv av1_compute_mv_difference(const TplDepFrame *tpl_frame, int row, int col,
699 int step, int tpl_stride, int right_shift);
700
708double av1_tpl_compute_frame_mv_entropy(const TplDepFrame *tpl_frame,
709 uint8_t right_shift);
710
715void av1_free_tpl_gop_stats(AomTplGopStats *extrc_tpl_gop_stats);
716
717#if CONFIG_RATECTRL_LOG
718typedef struct {
719 int coding_frame_count;
720 int base_q_index;
721
722 // Encode decision
723 int q_index_list[VBR_RC_INFO_MAX_FRAMES];
724 double qstep_ratio_list[VBR_RC_INFO_MAX_FRAMES];
725 FRAME_UPDATE_TYPE update_type_list[VBR_RC_INFO_MAX_FRAMES];
726
727 // Frame stats
728 TplTxfmStats txfm_stats_list[VBR_RC_INFO_MAX_FRAMES];
729
730 // Estimated encode results
731 double est_coeff_rate_list[VBR_RC_INFO_MAX_FRAMES];
732
733 // Actual encode results
734 double act_rate_list[VBR_RC_INFO_MAX_FRAMES];
735 double act_coeff_rate_list[VBR_RC_INFO_MAX_FRAMES];
736} RATECTRL_LOG;
737
738static inline void rc_log_init(RATECTRL_LOG *rc_log) { av1_zero(*rc_log); }
739
740static inline void rc_log_frame_stats(RATECTRL_LOG *rc_log, int coding_index,
741 const TplTxfmStats *txfm_stats) {
742 rc_log->txfm_stats_list[coding_index] = *txfm_stats;
743}
744
745#if CONFIG_RATECTRL_LOG && CONFIG_THREE_PASS && CONFIG_BITRATE_ACCURACY
746static inline void rc_log_frame_encode_param(RATECTRL_LOG *rc_log,
747 int coding_index,
748 double qstep_ratio, int q_index,
749 FRAME_UPDATE_TYPE update_type) {
750 rc_log->qstep_ratio_list[coding_index] = qstep_ratio;
751 rc_log->q_index_list[coding_index] = q_index;
752 rc_log->update_type_list[coding_index] = update_type;
753 const TplTxfmStats *txfm_stats = &rc_log->txfm_stats_list[coding_index];
754 rc_log->est_coeff_rate_list[coding_index] = 0;
755 if (txfm_stats->ready) {
756 rc_log->est_coeff_rate_list[coding_index] = av1_laplace_estimate_frame_rate(
757 q_index, txfm_stats->txfm_block_count, txfm_stats->abs_coeff_mean,
758 txfm_stats->coeff_num);
759 }
760}
761#endif // CONFIG_RATECTRL_LOG && CONFIG_THREE_PASS && CONFIG_BITRATE_ACCURACY
762
763static inline void rc_log_frame_entropy(RATECTRL_LOG *rc_log, int coding_index,
764 double act_rate,
765 double act_coeff_rate) {
766 rc_log->act_rate_list[coding_index] = act_rate;
767 rc_log->act_coeff_rate_list[coding_index] = act_coeff_rate;
768}
769
770static inline void rc_log_record_chunk_info(RATECTRL_LOG *rc_log,
771 int base_q_index,
772 int coding_frame_count) {
773 rc_log->base_q_index = base_q_index;
774 rc_log->coding_frame_count = coding_frame_count;
775}
776
777static inline void rc_log_show(const RATECTRL_LOG *rc_log) {
778 printf("= chunk 1\n");
779 printf("coding_frame_count %d base_q_index %d\n", rc_log->coding_frame_count,
780 rc_log->base_q_index);
781 printf("= frame %d\n", rc_log->coding_frame_count);
782 for (int coding_idx = 0; coding_idx < rc_log->coding_frame_count;
783 coding_idx++) {
784 printf(
785 "coding_idx %d update_type %d q %d qstep_ratio %f est_coeff_rate %f "
786 "act_coeff_rate %f act_rate %f\n",
787 coding_idx, rc_log->update_type_list[coding_idx],
788 rc_log->q_index_list[coding_idx], rc_log->qstep_ratio_list[coding_idx],
789 rc_log->est_coeff_rate_list[coding_idx],
790 rc_log->act_coeff_rate_list[coding_idx],
791 rc_log->act_rate_list[coding_idx]);
792 }
793}
794#endif // CONFIG_RATECTRL_LOG
795
797#ifdef __cplusplus
798} // extern "C"
799#endif
800
801#endif // AOM_AV1_ENCODER_TPL_MODEL_H_
struct macroblock MACROBLOCK
Encoder's parameters related to the current coding block.
enum aom_bit_depth aom_bit_depth_t
Bit depth for codecThis enumeration determines the bit depth of the codec.
int av1_tpl_setup_stats(struct AV1_COMP *cpi, int gop_eval, const struct EncodeFrameParams *const frame_params)
Implements temporal dependency modelling for a GOP (GF/ARF group) and selects between 16 and 32 frame...
Describes look ahead buffer operations.
Top level encoder structure.
Definition encoder.h:2907
Top level primary encoder structure.
Definition encoder.h:2600
Params related to MB_MODE_INFO arrays and related info.
Definition av1_common_int.h:511
Input frames and last input frame.
Definition encoder.h:3750
contains per-frame encoding parameters decided upon by av1_encode_strategy() and passed down to av1_e...
Definition encoder.h:3762
Data related to the current GF/ARF group and the individual frames within the group.
Definition firstpass.h:343
Params related to temporal dependency model.
Definition tpl_model.h:168
const YV12_BUFFER_CONFIG * src_ref_frame[INTER_REFS_PER_FRAME]
Definition tpl_model.h:232
YV12_BUFFER_CONFIG prev_gop_arf_tpl_recon
Definition tpl_model.h:249
struct scale_factors sf
Definition tpl_model.h:220
int ready
Definition tpl_model.h:172
TplDepFrame tpl_stats_buffer[MAX_LENGTH_TPL_FRAME_STATS]
Definition tpl_model.h:189
YV12_BUFFER_CONFIG prev_gop_arf_src
Definition tpl_model.h:244
uint8_t tpl_bsize_1d
Definition tpl_model.h:182
AV1TplRowMultiThreadSync tpl_mt_sync
Definition tpl_model.h:260
TplDepFrame * tpl_frame
Definition tpl_model.h:215
int border_in_pixels
Definition tpl_model.h:265
TplDepStats * tpl_stats_pool[MAX_LAG_BUFFERS]
Definition tpl_model.h:196
TplTxfmStats * txfm_stats_list
Definition tpl_model.h:204
int64_t prev_gop_arf_disp_order
Definition tpl_model.h:254
YV12_BUFFER_CONFIG tpl_rec_pool[MAX_LAG_BUFFERS]
Definition tpl_model.h:210
uint8_t tpl_stats_block_mis_log2
Definition tpl_model.h:177
int frame_idx
Definition tpl_model.h:225
double r0_adjust_factor
Definition tpl_model.h:270
const YV12_BUFFER_CONFIG * ref_frame[INTER_REFS_PER_FRAME]
Definition tpl_model.h:239